package com.jy.rhin.infra.cda.zhiyu;

import lombok.Getter;

@Getter
public enum TingLiSCDM {
    ShuangErTG("1", "双耳通过"),
    ShuangErWTG("2", "双耳未通过"),
    ZuoErTG("3", "左耳通过"),
    ZuoErWTG("4", "左耳未通过"),
    YouErTG("5", "右耳通过"),
    YouErWTG("6", "右耳未通过"),
    WeiSC("9", "双耳未查");

    private String code;
    private String desc;

    TingLiSCDM(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(String code) {
        for (TingLiSCDM enmu : TingLiSCDM.values()) {
            if (enmu.getCode().equals(code)) {
                return enmu.getDesc();
            }
        }
        return null;
    }
}
